{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all">
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
</style>
<body>
<form action="{:url('save')}" class="layui-form v3-admin-form" id="form">
    {include file="public/arguments" /}
    <div class="layui-fluid layui-anim layui-anim-fadein">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-row" style="padding-top: 8px">
                    <div class="layui-form-item">
                        <label class="layui-form-label">会员</label>
                        <div class="layui-input-block" lay-on="choose"
                             data-title="选择会员" data-url="{:url('user/choose')}" data-fun="chooseUser">
                            <input type="hidden" name="uid" id="uid" />
                            <input type="text" id="user" lay-verify="required" lay-reqtext="请选择会员"
                                   placeholder="点击选择会员" class="layui-input" readonly />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label req">标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" lay-verify="required" lay-reqtext="请输入标题"
                                   placeholder="请输入标题" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label req">详情</label>
                        <div class="layui-input-block">
                            {table:alone view='items/editor' info='[]' form='["field" => "content"]'/}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file="public/submit" /}
</form>
</body>
{include file="public/footer" /}
<script type="text/javascript" src="/static/admin/js/choose.js"></script>
<script>
    function chooseUser(data) {
        $('#uid').val(data.id);
        $("#user").val(data.code + ' - ' + data.nickname + ' - ' + data.mobile);
    }
</script>
</html>